<?php
require_once( PHP_PATH . 'common.php' );

$template->title = "View Your Group Expense  Report";

// get user's teams
$template->teams = Utility::getUserTeams();
$report = array();
if( isset( Url::$pageVars[ 'GETPOST' ][ 'tid' ] ) ){
	$teamId = Url::$pageVars[ 'GETPOST' ][ 'tid' ];
	$members = Url::$pageVars[ 'GETPOST' ][ 'members' ];
	if( is_numeric( $teamId ) && $teamId > 0 && count( $members ) ){
		// make final call to get all expenses report
			$report = ExpenseUtility::getTeamGroupExpensesReport( $teamId, $members );
	}
}
$template->report = $report;
